![]() |
SICompletionProcPtr |
||||
Header: | Sound.h | Carbon status: | Supported | |
Defines a pointer to a sound input completion callback. Your sound input completion function is called by the Sound Manager after recording terminates.
typedef void(* SICompletionProcPtr) ( inParamPtr );
You would declare your function like this if you were to name it MySICompletionCallback:
void MySICompletionCallback ( inParamPtr );
A pointer to the sound input parameter block that was used to initiate an asynchronous recording.
You can specify a sound input completion function in the completionRoutine field of a sound input parameter block that your application uses to initiate asynchronous recording directly from a device.
The Sound Input Manager executes your sound input completion function after recording terminates either because your application has called the SPBStopRecording function or because the prescribed limit is reached. The completion function is called only for asynchronous recording.
A common use of a sound input completion function is to set a global variable that alerts the application that it should dispose of a sound input parameter block that it had allocated for an asynchronous sound recording.
Because a sound input completion function is executed at interrupt time, it should not allocate, move, or purge memory (either directly or indirectly) and should not depend on the validity of handles to unlocked blocks.
If your sound input completion function accesses your application’s global variables, it must ensure that the A5 register contains the address of the boundary between the application global variables and the application parameters. Your application can pass the value of the A5 register to the sound input completion function in the userLong field of the sound input parameter block.
Your sound input completion function can determine whether an error occurred during recording by examining the error field of the sound input parameter block specified by inParamPtr. Your sound input completion function can change the value of that field to alert the application that some other error has occurred.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)